package com.swjd.sbm.dao;

import com.swjd.sbm.entity.Api_syjthread;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface Api_syjthreadMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Api_syjthread record);

    int insertSelective(Api_syjthread record);

    Api_syjthread selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Api_syjthread record);

    int updateByPrimaryKeyWithBLOBs(Api_syjthread record);

    int updateByPrimaryKey(Api_syjthread record);



    List<Map<String,Object>> getList(@Param("page") int page, @Param("pagecount") int pageCount,@Param("stuats") String stuats);

    @Select("SELECT * FROM api_syjthread WHERE openid ='moren123456789' ORDER BY id desc LIMIT #{page},#{pagecount}")
    List<Map<String,Object>> mygao(@Param("page") int page, @Param("pagecount") int pageCount,@Param("stuats") String stuats);

    @Insert("INSERT INTO api_syjthread(addtime,openid,text,img,status) VALUES(#{date},'moren123456789',#{text},#{img},0);")
    int addp(String img, String text, String date);
}